import request from '../../utils/request';

/**
 * 更新单个组件信息
 */
export function updateOne(widget) {
  return request(is.CONST.urls.batch_widgets, {
    method: 'POST',
    body: JSON.stringify([widget]),
  });
}

/**
 * 更新多个组件信息
 */
export function updateAll(widgets) {
  return request(is.CONST.urls.batch_widgets, {
    method: 'POST',
    body: JSON.stringify(widgets),
  });
}
